<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>标书制作管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zx/makeTender/list">标书制作列表</a></li>
		<%-- <shiro:hasPermission name="zx:makeTender:edit"><li><a href="${ctx}/zx/makeTender/form">标书制作添加</a></li></shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="makeTender" action="${ctx}/zx/makeTender/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<label>项目编号：</label>
				<form:input path="lzd.proNo" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li>
				<label>项目分类：</label>
				<sys:treeselect id="cgml" name="lzd.cgml.id" value="${lzd.cgml.id}" labelName="lzd.cgml.name" labelValue="${lzd.cgml.name}"
					title="项目具体分类" url="/zx/cgml/treeData" cssClass="required" />
			</li>
			<li>
				<label>关键字：</label>
				<form:input path="remarks" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li class="clearfix"></li>
			<li>
				<label>项目名称：</label>
				<form:input path="lzd.proName" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li>
				<label>项目具体分类：</label>
				<sys:treeselect id="keyword" name="lzd.keyword.id" value="${lzd.keyword.id}" labelName="lzd.keyword.name" labelValue="${lzd.keyword.name}"
					title="项目具体分类" url="/zx/keyword/treeData" cssClass="required" />
			</li>
			<li>
				<label>审核状态：</label>
				<form:select path="lzd.auditFileCount" cssStyle="width: 177px;">
					<form:option value="" htmlEscape="false">请选择</form:option>
					<form:option value="1" htmlEscape="false">已审核</form:option>
					<form:option value="2" htmlEscape="false">未审核</form:option>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>项目名称</th>
				<th>项目编号</th>
				<th>项目类型</th>
				<%-- <c:if test="${enname != 'bszz'}"><th>项目执行人</th></c:if>
				<c:if test="${enname eq 'bszz'}"><th>标书制作人</th></c:if> --%>
				<th>标书制作人</th>
				<th>项目负责人</th>
				<th>招标方式</th>
				<th>预算金额(<font style="color: red">万元</font>)</th>
				<th>审核人</th>
				<th>审核状态</th>
				<th>标书状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="lzd">
			<tr>
				<td title="${lzd.proName}">
					${fns:abbr(lzd.proName, 50)}
					<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${lzd.ts.sectionName}</span>
					 <c:choose>
						<c:when test="${lzd.isSubpackage eq '1'}">
							<c:if test="${lzd.ts.trashPro eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">废标</span>
							</c:if>
							<c:if test="${not empty lzd.ts.resetSectionId}">
								<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${lzd.ts.restartCount}次</span>
							</c:if>
						</c:when>
						<c:otherwise>
							<c:if test="${lzd.trashPro eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">废标</span>
							</c:if>
							<c:if test="${not empty lzd.resetLzdId}">
								<span class="label label-info" style="margin-left: 5px;font-size: 90%;font-weight: 400;">${lzd.restartCount}次</span>
							</c:if>
						</c:otherwise>
					</c:choose>
				
				</td>
				<td> 
					${lzd.proNo}
				</td>
				<td>
					${lzd.cgml.name}
				</td>
				<%-- <c:if test="${enname != 'bszz'}">
					<td>${lzd.proPerformer}</td>
				</c:if>
					
				<c:if test="${enname eq 'bszz'}">
					<td>${lzd.makeTenderBy}</td>
				</c:if> --%>
				<td>${lzd.makeTenderBy}</td>	
				<td>
					${lzd.proPic}
				</td>
				<td>
					${fns:getDictLabel(lzd.tenderWay, 'tender_way', '无')}
				</td>
				<td>
					<fmt:formatNumber value="${lzd.isSubpackage eq '1' ? lzd.ts.budgetMoney : lzd.budgetMoney}" type="currency" pattern="￥.000000"/>
				</td>
				<td>${lzd.auditor}</td>
				<td>
					<c:if test="${lzd.fileCount > 0}">
						<c:choose>
							<c:when test="${lzd.fileCount == lzd.auditFileCount}">
								<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">已审核</span>			
							</c:when>
							<c:otherwise>
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">未审核</span>	
							</c:otherwise>
						</c:choose>
					</c:if>
					<%-- <c:if test="${lzd.fileCount == 0}">
						<span class="label label-default" style="margin-left: 5px;font-size: 90%;font-weight: 400;">无标书</span>
					</c:if> --%>
				</td>
				<td>
					<%-- ${lzd.fileCount} --%>
					<c:choose>
						<c:when test="${lzd.fileCount > 0}">
							<c:if test="${lzd.tenderFlag eq '0'}">
								<span class="label label-warning" style="margin-left: 5px;font-size: 90%;font-weight: 400;">初版标书</span>
							</c:if>
							<c:if test="${lzd.tenderFlag eq '1'}">
								<span class="label label-success" style="margin-left: 5px;font-size: 90%;font-weight: 400;">终稿标书</span>
							</c:if>
						</c:when>
						<c:otherwise><span class="label label-default" style="margin-left: 5px;font-size: 90%;font-weight: 400;">暂未上传</span></c:otherwise>
					</c:choose>
							
				</td>
				<td>
					<shiro:hasPermission name="zx:makeTender:edit">
						<c:choose>
							<c:when test="${lzd.isSubpackage eq '1'}">
								<c:if test="${lzd.ts.trashPro != '0'}">
									<a href="${ctx}/zx/makeTender/form?lzdId=${lzd.id}&sectionId=${lzd.ts.id}">制作标书</a>&nbsp;&nbsp;&nbsp;&nbsp;
								</c:if>
							</c:when>
							<c:otherwise>
								<c:if test="${lzd.trashPro != '0'}">
									<a href="${ctx}/zx/makeTender/form?lzdId=${lzd.id}&sectionId=${lzd.ts.id}">制作标书</a>&nbsp;&nbsp;&nbsp;&nbsp;
								</c:if>
							</c:otherwise>
						</c:choose>
    					
    				</shiro:hasPermission>
    				<shiro:hasPermission name="zx:makeTender:view">
    					<%-- <a href="${ctx}/zx/all/lzd/getLzdAllInfo?lzdId=${lzd.id}&pageFlag=makeTenderShow">查看详情</a> --%>
    					<a href="${ctx}/zx/makeTender/show?lzdId=${lzd.id}&sectionId=${lzd.ts.id}"> 查看详情</a>
    				</shiro:hasPermission>
    				
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>